package kusterordonio.interfaz;

import java.awt.event.KeyEvent;
import kusterordonio.dominio.*;

public class VentanaSuenioSeguro extends javax.swing.JFrame {
    
    private boolean genero;

    /** Creates new form VentanaSuenioSeguro */
    public VentanaSuenioSeguro() {
        initComponents();
    }
    
    public VentanaSuenioSeguro(boolean unGenero) {
        genero = unGenero; 
        initComponents();
        controlGenero();
        jBtnSalir.setMnemonic(KeyEvent.VK_S);
    }
    
    @SuppressWarnings("unchecked")
    
    public void controlGenero(){
        if (!genero){
            jLabelTitulo.setForeground(new java.awt.Color(255, 153, 0));
            jLabel2.setForeground(new java.awt.Color(255, 153, 0));
            jLabelAbriga.setText("- No abrigarla demasiado.");
            jLabelBebe.setVisible(false);
        }else{
            jLabelBeba.setVisible(false);
        }
    }
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabelTitulo = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabelAbriga = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jBtnSalir = new javax.swing.JButton();
        jLabelBebe = new javax.swing.JLabel();
        jLabelBeba = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Sueño seguro");
        setBounds(new java.awt.Rectangle(200, 100, 0, 0));
        setMinimumSize(new java.awt.Dimension(400, 370));
        setResizable(false);

        jPanel1.setLayout(null);

        jLabelTitulo.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabelTitulo.setForeground(new java.awt.Color(51, 153, 0));
        jLabelTitulo.setText("Sueño seguro");
        jPanel1.add(jLabelTitulo);
        jLabelTitulo.setBounds(20, 20, 140, 20);

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(51, 153, 0));
        jLabel2.setText("Tu bebé necesita:");
        jPanel1.add(jLabel2);
        jLabel2.setBounds(30, 80, 160, 20);

        jLabel6.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel6.setText("- Dormir boca arriba.");
        jPanel1.add(jLabel6);
        jLabel6.setBounds(30, 130, 110, 20);

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel3.setText("- Que no fumen en el hogar.");
        jPanel1.add(jLabel3);
        jLabel3.setBounds(30, 210, 220, 20);

        jLabelAbriga.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabelAbriga.setText("- No abrigarlo demasiado.");
        jPanel1.add(jLabelAbriga);
        jLabelAbriga.setBounds(30, 170, 230, 20);

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel5.setText("- Tomar solo pecho los primeros 6 meses.");
        jPanel1.add(jLabel5);
        jLabel5.setBounds(30, 250, 300, 20);
        jPanel1.add(jSeparator1);
        jSeparator1.setBounds(0, 48, 500, 2);

        jBtnSalir.setText("Salir");
        jBtnSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBtnSalirActionPerformed(evt);
            }
        });
        jPanel1.add(jBtnSalir);
        jBtnSalir.setBounds(210, 300, 80, 22);

        jLabelBebe.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelBebe.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kusterordonio/recursos/bebe.gif"))); // NOI18N
        jPanel1.add(jLabelBebe);
        jLabelBebe.setBounds(240, 60, 230, 190);

        jLabelBeba.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelBeba.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kusterordonio/recursos/beba.gif"))); // NOI18N
        jPanel1.add(jLabelBeba);
        jLabelBeba.setBounds(240, 60, 230, 190);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 481, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 343, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    private void jBtnSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnSalirActionPerformed
        this.dispose();
    }//GEN-LAST:event_jBtnSalirActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBtnSalir;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabelAbriga;
    private javax.swing.JLabel jLabelBeba;
    private javax.swing.JLabel jLabelBebe;
    private javax.swing.JLabel jLabelTitulo;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JSeparator jSeparator1;
    // End of variables declaration//GEN-END:variables
}
